<?php
/**
 * Created by PhpStorm.
 * User: sks
 * Date: 16/5/4
 * Time: 上午11:45
 */

namespace Home\Controller;


use Think\Controller;


class GundongController extends Controller

{

    public function index(){

        $list = M('info')->where('id>0')->limit(0,10)->select();

       // p($list);

        $this->display();
    }

    public function ajax(){

            if(IS_AJAX){


                $step = 5;
                $page = $_POST['idd'];
                $start = ($page-1)*$step;
                $list = M('info')->where('id>0')->limit($start,$step)->select();
                echo json_encode(array('error'=>1,'message'=>$list,'page'=>$page));


            }



    }

}